package com.sky.mapper;

import com.sky.entity.Dish;
import com.sky.entity.DishFlavor;
import com.sky.entity.Setmeal;
import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {


    void insert(ShoppingCart shoppingCart);

    List<ShoppingCart> select(ShoppingCart shoppingCart);

    @Update("update sky_take_out.shopping_cart set number=#{number} where id=#{id}")
    void updateNumber(ShoppingCart shoppingCart);
    @Delete("delete from sky_take_out.shopping_cart where id=#{id}")
    void delectById(Long id);
    @Delete("delete from sky_take_out.shopping_cart where user_id=#{userId}")
    void clean(Long id);

    void insert2(List<ShoppingCart> shoppingCart);
}
